Optimal. Leaf size=35 \[ x (a B+A b)+\frac{a A \sin (c+d x)}{d}+\frac{b B \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0546407, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.074, Rules used = {3996, 3770} \[ x (a B+A b)+\frac{a A \sin (c+d x)}{d}+\frac{b B \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3996
Rule 3770
Rubi steps
\begin{align*} \int \cos (c+d x) (a+b \sec (c+d x)) (A+B \sec (c+d x)) \, dx &=\frac{a A \sin (c+d x)}{d}-\int (-A b-a B-b B \sec (c+d x)) \, dx\\ &=(A b+a B) x+\frac{a A \sin (c+d x)}{d}+(b B) \int \sec (c+d x) \, dx\\ &=(A b+a B) x+\frac{b B \tanh ^{-1}(\sin (c+d x))}{d}+\frac{a A \sin (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0281508, size = 46, normalized size = 1.31 \[ \frac{a A \sin (c) \cos (d x)}{d}+\frac{a A \cos (c) \sin (d x)}{d}+a B x+A b x+\frac{b B \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.047, size = 56, normalized size = 1.6 \begin{align*} Abx+Bax+{\frac{A\sin \left ( dx+c \right ) a}{d}}+{\frac{Abc}{d}}+{\frac{Bb\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{Bac}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.963863, size = 78, normalized size = 2.23 \begin{align*} \frac{2 \,{\left (d x + c\right )} B a + 2 \,{\left (d x + c\right )} A b + B b{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A a \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.493503, size = 142, normalized size = 4.06 \begin{align*} \frac{2 \,{\left (B a + A b\right )} d x + B b \log \left (\sin \left (d x + c\right ) + 1\right ) - B b \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, A a \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (A + B \sec{\left (c + d x \right )}\right ) \left (a + b \sec{\left (c + d x \right )}\right ) \cos{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.21985, size = 107, normalized size = 3.06 \begin{align*} \frac{B b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - B b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) +{\left (B a + A b\right )}{\left (d x + c\right )} + \frac{2 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]